package hn.cch.fallback;

import hn.cch.entity.Product;
import hn.cch.message.Response;
import hn.cch.service.ProductService;
import org.springframework.stereotype.Component;

@Component
public class ProductFallback implements ProductService {
    @Override
    public Product getOne(Integer id) {
        //容错
        Product product = new Product();
        product.setProductId(-1);
        return product;
    }

    @Override
    public Response<Product> subAny(Integer id, Integer stock) {
        return null;
    }

}
